﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" CodeFile="Register.aspx.cs"
    Inherits="Register" Title="注册输一下，我们帮你侦听八方" %>

<%@ MasterType VirtualPath="~/MasterPage.master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Content1" runat="Server">
    <div id="content" class="w800">
        <ul class="tablist fd-clr">
            <li class="current">
                <div class="edge">
                </div>
                <div class="content">
                    <h2>
                        新用户注册</h2>
                </div>
            </li>
        </ul>
        <div id="content-tab" class="tab-part fd-clr ">
            <div class="form-part">
                <table>
                    <tr>
                        <td class="col1">
                            <p class="suggestfix">
                                用户名<span class="xinghao">*</span></p>
                        </td>
                        <td class="col2">
                            <asp:TextBox ID="LoginIdTextBox" runat="server" ValidationGroup="test" CausesValidation="true"
                                Text="用户名可以由中英文字符及下划线组成" class="text" onFocus="javascript: if(this.value=='用户名可以由中英文字符及下划线组成') {this.value='';this.style.color=''}"
                                onBlur="javascript: if(this.value=='') {this.value='用户名可以由中英文字符及下划线组成';this.style.color='#ccc'}">
                            </asp:TextBox>
                        </td>
                        <td class="col3">
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="LoginIdTextBox"
                                ValidationGroup="test" Display="Dynamic" ErrorMessage="不能为空" runat="server" InitialValue="用户名可以由中英文字符及下划线组成" />
                            <asp:CustomValidator ID="CustomValidator" OnServerValidate="userExist_ServerValidate"
                                ControlToValidate="LoginIdTextBox" ValidationGroup="test" Display="Dynamic" ErrorMessage="用户已存在"
                                runat="server" />
                            <asp:CustomValidator ID="CustomValidator2" OnServerValidate="validfilename_ServerValidate"
                                ControlToValidate="LoginIdTextBox" ValidationGroup="test" Display="Dynamic" ErrorMessage="存在非法字符或名字过长"
                                runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td class="col1">
                            密码<span class="xinghao">*</span>
                        </td>
                        <td class="col2">
                            <asp:TextBox ID="PasswordTextBox" runat="server" class="text" TextMode="Password">
                            </asp:TextBox>
                        </td>
                        <td class="col3">
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" ValidationGroup="test" ControlToValidate="PasswordTextBox"
                                Display="Dynamic" ErrorMessage="不能为空" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td class="col1">
                            再次输入密码<span class="xinghao">*</span>
                        </td>
                        <td class="col2">
                            <asp:TextBox ID="PasswordTextBox2" runat="server" class="text" TextMode="Password">
                            </asp:TextBox>
                        </td>
                        <td class="col3">
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" ValidationGroup="test" ControlToValidate="PasswordTextBox2"
                                Display="Dynamic" ErrorMessage="不能为空" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td class="col1">
                            手机号码<span class="xinghao">*</span>
                        </td>
                        <td class="col2">
                            <asp:TextBox ID="MobileTextBox" runat="server" ValidationGroup="test" CausesValidation="true"
                                Text="请放心，我们绝不会泄露您的手机号码" class="text" onFocus="javascript: if(this.value=='请放心，我们绝不会泄露您的手机号码') {this.value='';this.style.color=''}"
                                onBlur="javascript: if(this.value=='') {this.value='请放心，我们绝不会泄露您的手机号码';this.style.color='#ccc'}">
                            </asp:TextBox>
                        </td>
                        <td class="col3">
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" ValidationGroup="test" ControlToValidate="MobileTextBox"
                                Display="Dynamic" ErrorMessage="不能为空" runat="server" InitialValue="请放心，我们绝不会泄露您的手机号码" />
                        </td>
                    </tr>
                </table>
                <div class="agreement">
                    <asp:CheckBox ID="CheckBox1" Checked="true" Text="我已看过并同意" onClick="onChecked(this)"
                        runat="server" /><a href="">《输一下服务条款》</a>
                </div>
                <asp:Button ID="Submit1" runat="server" class="submit" OnClick="Submit_Click" CausesValidation="true" Text="立即注册" ValidationGroup="test" 
                style="margin:14px 0 0 128px;border:none;outline:none;display:block;cursor:pointer;text-indent:-100000px;width:90px;height:29px;line-height:28px;background:url('./Pics/register.png') no-repeat;" />
            </div>
            <script type="text/javascript">
                function onChecked(checkbox) {
                    if (checkbox.checked == false) {
                        document.getElementById("<%=Submit1.ClientID%>").setAttribute("disabled", "");
                    }
                    else {
                        document.getElementById("<%=Submit1.ClientID%>").removeAttribute("disabled");
                    }
                }
            </script>
            <div class="info-part">
                <dl>
                    <dt><font color="#f86515">不想注册？</font>可通过以下方式直接登录</dt>
                    <dd>
                        <a href = "SignInSina.aspx"><asp:Image ID="Image3" ImageUrl="./pics/sina_weibo_login.png" runat="server" /></a>
                    </dd>
                    <dd>
                        <a href = "SignInSina.aspx"><asp:Image ID="Image1" ImageUrl="./pics/qq_login.png" runat="server" /></a></dd>
                    <dd>
                        腾讯微博</dd>
                    <dd>
                        淘宝</dd>
                </dl>
            </div>
        </div>
    </div>
</asp:Content>
